<?php
class Exchange extends MY_Controller{
    
    public function __construct() {
        parent::__construct();
        
        $this->load->model('main/menu_model');
        $this->load->model('main/front_model');
        $this->load->model('admin/page_model');
        
    }
   
    public function index($page='main/exchange'){
        
        $this->data['title'] = "Обмен OpenCart с 1С 7.7";
        $this->data['pages'] = $this->front_model->get_title();
        
        if ($page!=='main/exchange'){
            
          
            $this->data['content'] = $this->front_model->get_page($page);
            $this->data['prev_next'] = $this->front_model->get_prev_next((int)$this->data['content'][0]['id']);
            
            $this->data['title'] = $this->data['content'][0]['title'];
            $page='main/page';
        }
        
        

        
         $this->_render($page, $this->data);
    }

    public function view($page='index'){
        
        
   /*     
        $page = "main/".$page;
        
        if ( ! file_exists('application/views/'.$page.'.php'))
	{
		// Whoops, we don't have a page for that!
		show_404();
	}
	
	$data['title'] = ucfirst($page); // Capitalize the first letter
	
    
        
         $this->_render($page, $data);
       */ 
        
    }
    
   
    
}




?>
